Skip to content

fix(seo): canonical points to /chains/<slug> when provider IS a chain - #758

Merged
Flotapponnier merged 1 commit into
mainfrom
fix/canonical-to-chains
Jun 26, 2026
Merged

fix(seo): canonical points to /chains/<slug> when provider IS a chain#758
Flotapponnier merged 1 commit into
mainfrom
fix/canonical-to-chains

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Problem

Ahrefs flagged 10 `/products/` pages whose canonical points to a redirect:

URL Canonical Result
/products/bnb-usd /products/bnb 308 → /chains/bnb
/products/eth-usd /products/ethereum 308 → /chains/ethereum
/products/matic-usd /products/polygon 308 → /chains/polygon
/products/avalanche-official /products/avalanche 308 → /chains/avalanche
etc. (10 total)

Canonical → 308 → 200 is a confused signal — Google may ignore the canonical and split rank between source + final URL instead of consolidating on the chain hub.

Fix

`generateMetadata` in `products/[slug]/page.tsx` now checks `CHAIN_BY_SLUG` and points canonical (+ OG url) directly to `/chains/` when the resolved provider IS a chain. Non-chain providers (helius, dRPC, mobula, etc.) keep `/products/` as before.

Test plan after deploy

/products/eth-usd, /products/bnb-usd, /products/avalanche-official etc.
resolve to a canonical provider whose slug matches a chain (ethereum,
bnb, avalanche...). The previous canonical /products/<chain> then 308s
to /chains/<chain>, so Ahrefs + GSC flag 'canonical points to redirect'
and Google may split rank instead of consolidating on the final URL.

Now we check the chain registry and short-circuit the canonical (+ OG
url) straight to /chains/<slug> for chain-shaped providers. Non-chain
providers (helius, dRPC, mobula) keep /products/<slug>.
@Flotapponnier
Flotapponnier merged commit 32eb018 into main Jun 26, 2026
1 check passed
@Flotapponnier
Flotapponnier deleted the fix/canonical-to-chains branch July 17, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant